import { Routes } from '@angular/router';

import { LoginComponent } from './login/login.component';
import { LayoutComponent } from './layout/layout.component';
import { SysinfoComponent } from './sysinfo/sysinfo.component';
import { AdminListComponent } from './admin-list/admin-list.component';
import { AdminGroupComponent } from './admin-group/admin-group.component';

export const ROUTER_CONFIG: Routes = [
  {
    path: '',
    redirectTo: '/login',
    pathMatch: 'full'
  },
  {
    path: 'login',
    component: LoginComponent
  },
  {
    path: 'home',
    component: LayoutComponent,
    children: [
      {
        path: '',
        component: SysinfoComponent
      },
      {
        path: 'admin',
        component: AdminListComponent
      },
      {
        path: 'admingroup',
        component: AdminGroupComponent
      }
    ]
  }
];
